home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / u_man / cat1 / ps.z / ps
Encoding:
Text File  |  2002-10-03  |  20.8 KB  |  463 lines

  1.  
  2.  
  3.  
  4. ppppssss((((1111))))                                                                    ppppssss((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ps - report process status
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ppppssss [ options ]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _p_s prints information about active processes.  Without _o_p_t_i_o_n_s,
  16.      information is printed about processes associated with the controlling
  17.      terminal.  The output consists of a short listing containing only the
  18.      process ID, terminal identifier, cumulative execution time, and the
  19.      command name.  Since a batch job doesn't have a controlling terminal,
  20.      invoking ps without _o_p_t_i_o_n_s from a batch job will result in an error.
  21.      Otherwise, the information that is displayed is controlled by the
  22.      selection of _o_p_t_i_o_n_s.
  23.  
  24.      _o_p_t_i_o_n_s accept names or lists as arguments.  Arguments can be either
  25.      separated from one another by commas or enclosed in double quotes and
  26.      separated from one another by commas or spaces.  Values for _p_r_o_c_l_i_s_t and
  27.      _g_r_p_l_i_s_t must be numeric.
  28.  
  29.      The _o_p_t_i_o_n_s are:
  30.  
  31.      ----aaaa           Print information about aaaall processes most frequently
  32.                   requested:  all those except process group leaders and
  33.                   processes not associated with a terminal.
  34.  
  35.      ----AAAA           Print information about eeeevery process now running.
  36.  
  37.      ----cccc           Print information about the scheduler properties.  (See
  38.                   below.)
  39.  
  40.      ----dddd           Print information about all processes except process group
  41.                   leaders.
  42.  
  43.      ----eeee           Print information about eeeevery process now running
  44.                   (equivalent to ----AAAA).
  45.  
  46.      ----ffff           Generate a ffffull listing.  (See below for significance of
  47.                   columns in a full listing.)
  48.  
  49.      ----gggg _g_r_p_l_i_s_t   List only process data whose process group leader's ID
  50.                   numbers appear in _g_r_p_l_i_s_t.  (A group leader is a process
  51.                   whose process ID number is identical to its process group ID
  52.                   number.  A login shell is a common example of a process
  53.                   group leader.)
  54.  
  55.      ----GGGG _g_r_p_l_i_s_t   List only process data whose real group leader's ID numbers
  56.                   appears in _g_r_p_l_i_s_t.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ppppssss((((1111))))                                                                    ppppssss((((1111))))
  71.  
  72.  
  73.  
  74.      ----jjjj           Print process ID, process group ID, session ID, and job ID.
  75.                   The job ID is printed out in hexadecimal.  When the job ID
  76.                   is specified, the "0x" prefix is optional.
  77.  
  78.      ----JJJJ _j_i_d_l_i_s_t   List information on all jobs whose IDs appear in _j_i_d_l_i_s_t
  79.                   (shows the job ID if the eoe.sw.jlimits package is
  80.                   installed).
  81.  
  82.      ----llll           Generate a llllong listing.  (See below.)
  83.  
  84.      ----MMMM           If the system supports Mandatory Access Control, print the
  85.                   security label for each process.  The ----MMMM option can be
  86.                   automatically be turned on by using an environmental
  87.                   variable LABELFLAG.  Set variable to oooonnnn (not case sensitive)
  88.                   for automatic security label information.  To turn off
  89.                   feature set to ooooffffffff or NNNNUUUULLLLLLLL.
  90.  
  91.      ----nnnn _n_a_m_e      This argument is obsolete and is no longer used.
  92.  
  93.      ----oooo _f_o_r_m_a_t    Print information according to the format specification
  94.                   given in _f_o_r_m_a_t.  (See below.)
  95.  
  96.      ----PPPP           If the system supports capabilities then print the
  97.                   capabilities of each process.
  98.  
  99.      ----pppp _p_r_o_c_l_i_s_t  List only process data whose process ID numbers are given in
  100.                   _p_r_o_c_l_i_s_t.
  101.  
  102.      ----ssss _s_e_s_s_l_i_s_t  List information on all session leaders whose IDs appear in
  103.                   _s_e_s_s_l_i_s_t.
  104.  
  105.      ----tttt _t_e_r_m_l_i_s_t  List only process data associated with the terminal given in
  106.                   _t_e_r_m_l_i_s_t.  Terminal identifiers consist of the device's name
  107.                   (for example, ttttttttyyyydddd1111, ttttttttyyyyqqqq1111).
  108.  
  109.      ----TTTT           List data for individual kernel threads.  Normally the
  110.                   information presented is a summation across all threads of
  111.                   the process.  This is of use when examining POSIX threaded
  112.                   processes.
  113.  
  114.      ----uuuu _u_i_d_l_i_s_t   List only process data whose user ID number or login name is
  115.                   given in _u_i_d_l_i_s_t.  In the listing, the numerical user ID is
  116.                   printed unless you give the ----ffff option, which prints the
  117.                   login name.
  118.  
  119.      ----UUUU _u_i_d_l_i_s_t   List only process data whose real user ID number or login
  120.                   name is given in _u_i_d_l_i_s_t.
  121.  
  122.      Under the ----ffff option, _p_s tries to determine the command name and arguments
  123.      given when the process was created by examining the user block.  Failing
  124.      this, the command name is printed, as it would have appeared without the
  125.      ----ffff option, in square brackets.
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ppppssss((((1111))))                                                                    ppppssss((((1111))))
  137.  
  138.  
  139.  
  140.      The column headings and the meaning of the columns in a _p_s listing are
  141.      given below.  The letters ffff and llll indicate the option (ffffull or llllong,
  142.      respectively) that causes the corresponding heading to appear (assuming
  143.      the ----oooo option is not specified); aaaallllllll means that the heading always
  144.      appears.  Note that these options determine only what information is
  145.      provided for a process; they do not determine which processes are listed.
  146.  
  147.      If the environment variable _XPG is defined and has a numeric value
  148.      greater than 0, _p_s operates in conformance with the X/Open XPG4
  149.      specifications.  The format of the output of the ----llll option differs in
  150.      some details from the XPG format and backward compatibility mode.  The
  151.      differences are explained in the table below.
  152.  
  153.      FFFF     (l)      Flags (hexadecimal and additive) associated with the
  154.                     process:
  155.  
  156.                     001   Process is a system (resident) process.
  157.                     002   Process is being traced.
  158.                     004   Stopped process has been given to parent via
  159.                           _w_a_i_t(2).
  160.                     008   Process is sleeping at a non-interruptible priority.
  161.                     010   Process is in core.
  162.                     020   Process user area is in core.
  163.                     040   Process has enabled atomic operator emulation.
  164.                     080   Process in stream poll or select.
  165.                     100   Process is a kernel thread.
  166.  
  167.      SSSS     (l)      The state of the process:
  168.  
  169.                     0   Process is running on a processor.
  170.                     S   Process is sleeping, waiting for a resource.
  171.                     R   Process is running.
  172.                     Z   Process is terminated and parent not waiting
  173.                         (_w_a_i_t(2)).
  174.                     T   Process is stopped.
  175.                     I   Process is in intermediate state of creation.
  176.                     X   Process is waiting for memory.
  177.                     C   Process is creating core image after error.
  178.  
  179.  
  180.      UUUUIIIIDDDD    (f,l)   The user ID number of the process owner (the login name is
  181.                     printed under the ----ffff option).
  182.  
  183.      PPPPIIIIDDDD    (all)   The process ID of the process (this datum is necessary in
  184.                     order to kill a process).
  185.  
  186.      PPPPPPPPIIIIDDDD   (f,l)   The process ID of the parent process.
  187.  
  188.      PPPPGGGGIIIIDDDD   (j)     Process group leader ID.  This can be used with the ----gggg
  189.                     option.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ppppssss((((1111))))                                                                    ppppssss((((1111))))
  203.  
  204.  
  205.  
  206.      SSSSIIIIDDDD    (j)     Session ID.  This can be used with the ----ssss option.
  207.  
  208.      JJJJIIIIDDDD    (j)     Job ID.  This can be used with the ----JJJJ option.
  209.  
  210.      CCCCLLLLSSSS    (c)     Scheduling class.  The values printed for CCCCLLLLSSSS are two
  211.                     character mnemonics for the scheduler class.  RT indicates
  212.                     real-time, TS indicates timeshare, B indicates batch, BC
  213.                     indicates batch critical, WL indicate weightless and GN
  214.                     indicates gang scheduled.
  215.  
  216.      CCCC      (f,l)   Processor utilization for scheduling.  Not printed when
  217.                     the ----cccc option is used.
  218.  
  219.      PPPPRRRRIIII    (l)     The priority of the process (higher numbers mean higher
  220.                     priority).  If the class of the process is WL, w is
  221.                     displayed as the priority.  If the process is scheduled
  222.                     via _m_i_s_e_r(1) it may be b for batch or bc for batch
  223.                     critical.
  224.  
  225.      NNNNIIII     (l)     Nice value, used in priority computation.  Not printed
  226.                     when the ----cccc option is used (see _n_i_c_e(1) and _c_s_h(1)).  Only
  227.                     processes in the time-sharing class have a nice value.
  228.                     Processes in other scheduling classes have their two
  229.                     letter class mnemonic printed in this field (refer to CLS
  230.                     description above).
  231.  
  232.      PPPP      (l)     If the process is running, gives the number of processor
  233.                     on which the process is executing.  Contains an asterisk
  234.                     otherwise.  This is not displayed in X/OPEN XPG4
  235.                     conformance mode.
  236.  
  237.      AAAADDDDDDDDRRRR  (l)      The physical address of the process.  This is only
  238.                     displayed in X/OPEN XPG4 conformance mode.
  239.  
  240.      SSSSZZZZ     (l)     Total size (in pages) of the process, including code,
  241.                     data, shared memory, mapped files, shared libraries and
  242.                     stack.  Pages associated with mapped devices are not
  243.                     counted.  (Refer to _s_y_s_c_o_n_f(1) or _s_y_s_c_o_n_f(3C) for
  244.                     information on determining the page size.)
  245.  
  246.      RRRRSSSSSSSS    (l)     Total resident size (in pages) of process.  This includes
  247.                     only those pages of the process that are physically
  248.                     resident in memory.  Mapped devices (such as graphics) are
  249.                     not included.  Shared memory (_s_h_m_g_e_t(2)) and the shared
  250.                     parts of a forked child (code, shared objects, and files
  251.                     mapped MMMMAAAAPPPP____SSSSHHHHAAAARRRREEEEDDDD) have the number of pages prorated by
  252.                     the number of processes sharing the page.  Two independent
  253.                     processes that use the same shared objects and/or the same
  254.                     code each count all valid resident pages as part of their
  255.                     own resident size.  The page size can either be 4096 or
  256.                     16384 bytes as determined by the return value of the
  257.                     _g_e_t_p_a_g_e_s_i_z_e(2) system call.  In general the larger page
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. ppppssss((((1111))))                                                                    ppppssss((((1111))))
  269.  
  270.  
  271.  
  272.                     size is used on systems where _u_n_a_m_e(1) returns "IRIX64".
  273.                     This is not displayed in X/OPEN XPG4 conformance mode.
  274.  
  275.      WWWWCCCCHHHHAAAANNNN  (l)     The name (or address if the name is unavailable) of an
  276.                     event for which the process is sleeping, or in SXBRK
  277.                     state, (if blank, the process is running).
  278.  
  279.      SSSSTTTTIIIIMMMMEEEE  (f)     The starting time of the process, given in hours, minutes,
  280.                     and seconds.  (A process begun more than twenty-four hours
  281.                     before the _p_s inquiry is executed is given in months and
  282.                     days.)
  283.  
  284.      TTTTTTTTYYYY    (all)   The controlling terminal for the process (the message, ????,
  285.                     is printed when there is no controlling terminal).
  286.  
  287.      TTTTIIIIMMMMEEEE   (all)   The cumulative execution time for the process.
  288.  
  289.      CCCCOOOOMMMMMMMMAAAANNNNDDDD(all)   The command name (the full command name and its arguments
  290.                     are printed under the ----ffff option).  A process that has
  291.                     exited and has a parent, but has not yet been waited for
  292.                     by the parent, is marked <<<<ddddeeeeffffuuuunnnncccctttt>>>>.
  293.  
  294.      The ----oooo option allows the output format to be specified under user
  295.      control.
  296.  
  297.      The format specification must be a list of names presented as a single
  298.      argument, blank- or comma-separated.  Each variable has a default header.
  299.      The default header can be overridden by appending an equals sign and the
  300.      new text of the header.  The rest of the characters in the argument are
  301.      used as the header text.  The fields specified are written in the order
  302.      specified on the command line and should be arranged in columns in the
  303.      output.  The field widths are selected by the system to be at least as
  304.      wide as the header text (default or overridden value).  If the header
  305.      text is null such as ----oooo user=, the field width is at least as wide as the
  306.      default header text.  If all header text fields are null, no header line
  307.      is written.
  308.  
  309.      The following names are recognized:
  310.  
  311.      rrrruuuusssseeeerrrr    The real user ID of the process.
  312.      uuuusssseeeerrrr     The effective user ID of the process.
  313.      rrrrggggrrrroooouuuupppp   The real group UD of the process.
  314.      ggggrrrroooouuuupppp    The effective group ID of the process.
  315.      jjjjiiiidddd      The hexadecimal value of the job ID.
  316.      ppppiiiidddd      The decimal value of the process ID.
  317.      ppppppppiiiidddd     The decimal value of the parent process ID.
  318.      ppppggggiiiidddd     The decimal value of the process group ID.
  319.      ppppccccppppuuuu     The ratio of CPU time used recently to the CPU time available in
  320.               the same period, expressed as a percentage.
  321.      vvvvsssszzzz      The size of the process in (virtual) memory.
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. ppppssss((((1111))))                                                                    ppppssss((((1111))))
  335.  
  336.  
  337.  
  338.      nnnniiiicccceeee     The decimal value of the system scheduling priority of the
  339.               process.
  340.      ttttiiiimmmmeeee     The cumulative CPU time of the process.
  341.      eeeettttiiiimmmmeeee    The elapsed time since the process was started.
  342.      ssssttttiiiimmmmeeee    The starting time of the process.
  343.      ffffllllaaaagggg     Flags associated with the process.
  344.      ssssttttaaaatttteeee    The state of the process.
  345.      wwwwcccchhhhaaaannnn    The address of an event for which the process is waiting or
  346.               sleeping.
  347.      wwwwnnnnaaaammmmeeee    The name (or address if the name is unavailable) of an event for
  348.               which the process is waiting or sleeping.
  349.      uuuuttttiiiillll     Processor utilization for scheduling.
  350.      uuuuiiiidddd      The user ID number of the process owner.
  351.      ccccppppuuuu      The processor process is currently executing on.
  352.      ccccllllaaaassssssss    The scheduling class of the process.
  353.      ttttttttyyyy      The name of the controlling terminal of the process (if any) in
  354.               the same format used by the who utility.
  355.      ccccoooommmmmmmm     The name of the command being executed (argv[0] value) as a
  356.               string.
  357.      aaaarrrrggggssss     The command with all its arguments as a string.
  358.      llllaaaabbbbeeeellll    The MAC label of the running process.
  359.  
  360.      The file /_t_m_p/._p_s__d_a_t_a/._p_s__d_a_t_a is used to improve the performance of _p_s
  361.      by caching kernel info, and some device information.  It is recreated
  362.      when it is older (either the mtime or ctime) than /_u_n_i_x, or /_d_e_v, or when
  363.      a read error occurs on the file.  _p_s runs noticeably slower when this
  364.      file isn't used, or needs to be recreated.
  365.  
  366. SSSSHHHHAAAARRRREEEE IIIIIIII AAAACCCCTTTTIIIIOOOONNNNSSSS
  367.      When the Share II package is installed and enabled, every process
  368.      acquires a new property: its _a_t_t_a_c_h_e_d _l_n_o_d_e.  The _l_n_o_d_e is the kernel
  369.      structure that is used to store per-user resource and administration data
  370.      under Share II.  Many processes can be attached to the same lnode.
  371.  
  372.      An lnode contains a user's resource limits, including limits on memory
  373.      usage and `number of processes'.  All the processes attached to an lnode
  374.      are collectively subject to the lnode's memory and process limits.
  375.  
  376.      Each lnode is addressed by a unique key which is a UID number.  When
  377.      given the ----yyyy option, _p_s reports each process's lnode attachment under the
  378.      `UID' column as a UID or login name.
  379.  
  380. FFFFIIIILLLLEEEESSSS
  381.      /dev
  382.      /dev/tty*
  383.      /etc/passwd    UID information supplier
  384.      /tmp/.ps_data/.ps_data
  385.                     internal data structure
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. ppppssss((((1111))))                                                                    ppppssss((((1111))))
  401.  
  402.  
  403.  
  404. SEE ALSO
  405.      capabilities(4), getty(1M), gr_osview(1), gr_top(1), kill(1), miser(1),
  406.      nice(1), sysconf(1), top(1), sched_setscheduler(2), sysconf(3C).
  407.  
  408. WWWWAAAARRRRNNNNIIIINNNNGGGG
  409.      Things can change while _p_s is running; the snapshot it gives is only true
  410.      for a splitsecond, and it may not be accurate by the time you see it.
  411.      Some data printed for defunct processes is irrelevant.
  412.  
  413.      If no _t_e_r_m_l_i_s_t, _p_r_o_c_l_i_s_t, _u_i_d_l_i_s_t, or _g_r_p_l_i_s_t is specified, _p_s checks
  414.      _s_t_d_i_n, _s_t_d_o_u_t, and _s_t_d_e_r_r in that order, looking for the controlling
  415.      terminal and attempts to report on processes associated with the
  416.      controlling terminal.  In this situation, if _s_t_d_i_n, _s_t_d_o_u_t, and _s_t_d_e_r_r
  417.      are all redirected, _p_s does not find a controlling terminal, so there is
  418.      no report.
  419.  
  420.      ppppssss ----eeeeffff may not report the actual start of a tty login session, but rather
  421.      an earlier time, when a getty was last respawned on the tty line.
  422.  
  423. BBBBUUUUGGGGSSSS
  424.      The CCCC and AAAADDDDDDDDRRRR fields currently always report 0.  The output resulting
  425.      from using the format specification ppppccccppppuuuu is also always 0.
  426.  
  427.      When a machine's system time is corrected by timed or timeslave and if
  428.      the correction sets the time to an earlier value, ps reports a
  429.      meaningless huge or negative TIME value for the timed or timeslave
  430.      processes.
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.